package com.example.demo.mapper;

import com.example.demo.entity.Permission;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionMapper {

    @Select("select * from permission")
    List<Permission> findAll();

    @Insert("insert into sys_user(username,password,email,phone,nickname,address) " +
            "VALUES(#{username},#{password},#{email},#{phone},#{nickname},#{address});")
    int insert(Permission permission);
}
